import { extend } from "umi-request"
import storageUtils from '../utils/storageUtils'
const request = extend({
    // 在请求的路径前面拼接内容
    prefix: "http://web.woniulab.com:8005",
    // suffix:".json",
    timeout: 2000,
    headers: {
        "Authorization": storageUtils.getStorage('token')
    },
    // params:{
    //     token:"xxx"
    // },
    errorHandler: error => {
        console.log("请求失败：", error);
    },
})
export default request